﻿using System;
using Autodesk.Revit.ApplicationServices;
using Autodesk.Revit.Attributes;
using Autodesk.Revit.UI;

namespace HYRElectric.WirePlace
{
	[Transaction(TransactionMode.Manual)]
	[Regeneration(RegenerationOption.Manual)]
	public class ChangeAngleApp : IExternalApplication
	{
		public Result OnShutdown(UIControlledApplication application)
		{
			return Autodesk.Revit.UI.Result.Succeeded;
		}

		public Result OnStartup(UIControlledApplication application)
		{
			return Autodesk.Revit.UI.Result.Succeeded;
		}

		private void CreateRibbonSamplePanel(UIControlledApplication application)
		{
			string text = "Tianhua Revit";
			RibbonPanel ribbonPanel = application.CreateRibbonPanel(text);
			ribbonPanel.AddItem(new PushButtonData("倒角开关", "倒角开关", "C:\\ProgramData\\Autodesk\\Revit\\Addins\\2016\\ChangeAngle.dll", "ChangeAngle.ChangeAngleCmd"));
			ribbonPanel.AddItem(new PushButtonData("倒角转直角", "倒角转直角", "C:\\ProgramData\\Autodesk\\Revit\\Addins\\2016\\ChangeAngle.dll", "ChangeAngle.ChangeAngleDisCmd"));
		}

		private static ControlledApplication m_CtrlApp;
	}
}
